package com.blabla.controller;

import com.blabla.service.LogService;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/blabla")
public class LogController {
    @Resource
    private LogService logService;
    @GetMapping("/getlog")
    public String getFirstLog(Integer userid){
        return logService.getFirstLog(userid)+" everyday is best";
    }

    @GetMapping("/insert")
    public boolean insertLog(@Param("userid") Integer userid, @Param("sign")String sign, @Param("ext")String ext){
        return logService.insertLog(userid,sign,ext);
    }
}
